Skip to main content

Full text of "Development of Switch Mode Dc Converter Using MATLAB/ dSPACE"

See other formats


ACEEE Int. J. on Control System and Instrumentation, Vol. 02, No. 03, October 201 1 

Development of Switch Mode Dc Converter Using 

MATLAB/dSPACE 

First A. P.Srikanth 1 , Second B. Dr R.Saravana Kumar 2 
1 VIT University, School of Electrical Engineering, Vellore, India 

Email: psreddyl988@yahoo.com 
2 VIT University, School of Electrical Engineering, Vellore, India 

Email: rsaravanakumar@vit.ac.in 



Abstract — In this paper with the help of Matlab/Simulink and 
dSPACE, the Switch-Mode DC Converter is built in real-time 
to control the output voltage of the controller using PWM 
algorithm. First, the Simulink model of Switch-Mode DC 
Converter (i.e. Single-Pole and Two-Pole Converter Model) 
is built and, after verifying the results, it is implemented in 
real-time. Next, a DC motor is connected to the output 
terminals (i.e. Phase At and Phase Bl) of the Power Electronics 
Board such that a variable voltage is applied to the terminals 
of DC motor. Now, by changing the magnitude of the applied 
voltage, the speed of the motor is varied. This is also referred 
to as an open-loop voltage control of DC motor. The purpose 
of the real-time implementation is obtaining variable voltage 
at the output of the power converter, while controlling its 
amplitude with a dSPACE DS1104-based user interface. 

Index Terms — Single-pole, Two-pole, dSPACE. 

I. Introduction 

In the switch pole converter circuit, the input voltage and 
output load are assumed constant. The switching power pole 
operates with a switching function q A (t), whose waveform 
repeats, unchanged from one cycle to the next, and the 
corresponding switching duty ratios are constant at its DC 
steady-state. The output pole voltage V m (t) is either V d (input 

voltage) or depending upon the position of the converter 
switch. Theconverter switch is pulse-width modulated by 
comparing triangular waveform with the control voltage 

V . There are two such PWM strategies, one is PWM with 
unipolar voltage switching in this, switches in each leg are 
controlled independently of the other leg and another one is 
PWM with bipolar voltage switching, in this, switches in 
each pair are turned ON and OFF simultaneously. The 
objective is to develop a real time model using dSPACE 
DS1 104_DSP_PWM3 to obtain variable voltage at the output 
of the converter for controlling speed of the DC motor. The 
dSPACE provides complete solutions for electronic control 
unit (ECU) software development and it is powerful 
development tools for dedicated services in the field of 
function prototyping, target implementation, and ECU testing. 
Real time control systems can be built using dSPACE and the 
control logic can be implemented and works on Matlab/ 
Simulink platform. Here the speed of the DC motor is 
controlled by Pulse Width Modulation (PWM) technique to 
obtain a smooth speed variation without reducing the starting 
torque of the motor. 

©2011 ACEEE 
DOI:01.LICSI.02.03.197 



II. PWM TECHNIQUES OF POWER POLE CONVERTER 

Controlling the pulse width of the switching function q A (t) 
can be accomplished using a technique called Pulse Width 
Modulation (PWM). In this technique a control voltage V (t) 
is compared with triangular waveform signal to obtain q A (t). 

tf v c, A ( t )> v tn ( t )^q A ( t ) = 1 
if v c , A (t)<v M (t)*q A (t)=o 

The average output voltage V AN (t) of the power-pole with 
respect to duty ratio over one switching cycle is given by 
V AN (t) = q A (t)*V d 

A.PWM with unipolar voltage switching 

The uni-polar switching converter [4] shown in fig.l 
consists of single pole. The output pole-voltage, V AB (t) of 
the unipolar converter is either V d (input voltage) or 0, 
depending upon the position of the bi -positional switch and 
the pole switching function q A (t). 

The duty ratio for a single PWM pole is given by the 
equation. 



in it- \ 



■i ■ -i ■ -i. 

port 



*i « 



AAA 



r rW« 



.X 






Ay 



id 



Olffi'W 
port 



*i» 



Figure 1. Single-pole converter 



29 



vcACEEE 



ACEEE Int. J. on Control System and Instrumentation, Vol. 02, No. 03, October 201 1 




• cl 



■ ..» 



— t~~ i — i~n i— 


■ i i ■ 

q s i r i 




^jj La.: : 

-F=wn r . 



Figure 2. Unipolar voltage switching 

For V = IV we obtain the relation for the control voltage 



v c , A (t). 



,,, 2v AN (t) 

VcA*) = —y - l 



B. PWM with bipolar voltage switching 

In two pole converter model [4], the average output 
voltage V (t) can be positive or negative. The DC converter 
consists of two switching power poles as shown in Fig. 3. 

The converter average output voltage is the difference 
between the two pole output voltages, measured with respect 
to the DC bus ground. 

v (t) = V AB (t) = V AN (t) - V BN (t) 

The output voltage V AB (t) as shown in fig 4. At any given 
instant of time, the control voltages for the two poles are 
complimentary, i.e. 



r(0 



I'^<0 - -V«*CO 



d*(0 = ^ (>**<*) + 1) 



d B {t) = ^ (- ***M + 2 ) 



u 



vj** 



V 

* 

■J 




f V\ 1 








7™- 




l«t/l 


rs. 

I >j* — 


^ — -j/_! 




1-1*1 


1 "V 

' T * 


A 






J T ' i. 


l 


JL4- 


| 1 

V 




i . 

i 








R* f— "it* 1 - kB*}' 



T-:~t 



ff 



l£ 



Figure 4. Bipolar voltage switching 

II. Simulation Of Dc Switch Mode Converter 

A. Simulink Model for Single Pole Converter 

The simulink model is implemented to obtain the duty 
ratio and switching function for the single pole converter 
model shown in Fig 5. The control voltage c A (t) is compared 
with triangular waveform using a relay block. The output of 
relay is set to 1 if the difference between control voltage and 
triangular signal is positive, otherwise 0. The values of DC 
bus voltage (V = 42) and switching frequency (fsw = 10000) 
are set at the Matlab command prompt before the simulation. 
The desired voltage V AN , with respect to the negative dc-bus 
ground is set by a constant block with the value of one, and 
can be varied with a slider gain from '0' to the maximum de- 
bus voltage V d (42V). The duty ratio and switching function 
waveforms of single-pole converter model are shown in Fig. 
6. 



f-l .1 


u 


* 


: : 


c 


* |[ 


:,.. 



■ r 



•H 



ttian 






ill) 



■fott 



t*w 



fail 



*** 



-■■: 



Figure 5. Simulink model of switching function and duty ratio 
generation of single pole converter 



Figure 3. Two-pole DC converter 



©2011 ACEEE 
DOI:01.LTCSI.02.03.197 



30 



—ACEEE 



ACEEE Int. J. on Control System and Instrumentation, Vol. 02, No. 03, October 201 1 




Figure 6. Switching function qA and duty ratio q A 

B. Simulink Model for two - Pole Converter 

Simulink model of two pole converter in Fig. 7 is the 
comparison of two control voltages V CA (t) and V (t) with 
triangular waveform. The Switch block, which allow the upper 
signal to pass when the middle input is greater than the 
specified threshold and the lower signal in the opposite case. 
The Relay block provides the switching functions for the 
poles q A and q B . The converter output voltage will be the 
difference between the two pole-output voltages, measured 
with respect to the dc-bus ground In the two-pole converter 
model the output voltage is determined with two slider gain 
values. Fig. 8 presents the output voltage and duty ratios 
when the slider gain was set to positive value. In the Fig. 9 
the output voltage and duty ratios are calculated when the 
slider gain value was set to negative value. The input is the 
desired average output-voltage V AB . The instantaneous 
output voltage will be a square wave signal and the average 
value will be equal to the value set by slider gain. By varying 
the value of slider gain (i.e. vary the desired average output 
voltage value), the output voltage value changes. 



r~ — i -I 

* \. * ■ * 



.... * . 



Ww" 



<r.a n* J 




u 3 



Figure 7. Simulink model of switching function and duty ratio 
generation of two pole converter 



©2011 ACEEE 
DOL01.UCSI.02.03.197 



: 










W 






■ 




u 


j 








J> 




!" 






M 








■ 




M 










IH <• 








tt l> H It . 1 u to if 


n J u ii * « i 'J 

i* 1 ™x 


• i ii ii i 




'•*, 




* 








» 




1 t, J "* 



Figure 8. Two-pole converter model with Vout = +10v 




Figure. 9 Two-pole converter model with Vout = -10V 

C. Simulink model for Real time two pole Switch mode 
converter 

After obtaining the results of duty ratios and output 
voltage for the two-pole converter in the Simulink, this 
converter is implemented in the real-time on dSPACE DS 1 1 04 
controller board. In the real-time model the converter output 
voltage can be controlled with the help of dSPACE control - 
desk. 

The triangular waveform generator and the comparator 
for all converter poles of Fig 7 can be replaced with 
DS1104SL_DSP_PWM3 [2] block provides by dSPACE. The 
duty ratios served as the inputs to DS1 104SL_ DSP_PWM3. 
The Fig. 10 presents the two - pole converter model in real- 
time. 













;.i ■ .i 



*■:.■ 



EH 1 



"** 



Figure 10. Two Pole Switch-Mode Converter Model in Simulink 



31 



vc ACEEE 



ACEEE Int. J. on Control System and Instrumentation, Vol. 02, No. 03, October 201 1 



IV. Implementation of switch mode dc converters in dc 
motor 

The implementation of the model for control of DC Motor 
in open-loop as shown in Fig. 1 1 . The DC motor is connected 
to the output terminals of the Power Electronics Board such 
that a variable voltage is applied to the terminals of DC motor. 
Now, by varying the magnitude of the applied voltage, the 
speed of the motor is varied. This is also referred to as an 
open-loop voltage control of DC motor. The set up has 42 V 
dc-bus, two completely independent 3-phase PWM inverters 
for complete simultaneous control of two DC machines, 
digital PWM input channels for real-time digital control of 
converters, and complete digital/analog interface with 
dSPACE board. Connect the armature of the dc-motor board 
has to be connected to Channel 5 A/D converter of the 
dSPACE controller box. The DS1104ENC_POS_C1 and 
DS1104ADC_C5 blocks of dSPACE library are used to 
measure the speed and current of the DC motor under control 
in real-time. Also, the encoder output is connected to the 
INC1 9-pins DSUB connector on the dSPACE controller. The 
speed of a dc-motor can be modified by varying its supply 
voltage. Connect the Lab Oscilloscope to the PHASE A 1 and 
PHASE Bl terminals of the motor drives board. 

A. Current measurement 

For measuring the current we will be using Channel 5 of 
the A/D converter in the CP1 104 control board [6] . The motor 
drives current sensor IV equals 2 amps so it actually needs 
to be scaled by 20. The real-time value of armature current I 
for the supply voltage V AB = 40V observed in the Control 
Desk window is shown in Fig. 12. 



: 

VII *»■ 



•■•: 
..... 






Mi* 



::'-: : :. jsffwh 



&-i+4- 



-:: 



NlbiM 



TitfjrPffi 



:: ■:• .■:: u 



§^ 







EUKEH 



Kl«4fHtJ«.tl HuM^SEM 



Figure 1 1 . Real-time model for no-load motor test 

©2011 ACEEE 
DOI:01.LTCSI.02.03.197 





91 




»» 




»* 




CM 


1 

1 


a 1 




D t 




»s 




O " 




■ai 




111! 



Figure 12. Armature Current at V d = 40 V Displayed in the control 

desk 

B. Speed Measurement 

To measure speed of the dc motor use the DS1 104ENC_ 
POS_Cl [2], which provides read access to the delta position 
and position of the first encoder interface input channel. The 
delta position represents the scaled difference of two 
successive position values of a channel. To receive the radian 
angle from the encoder the result has to be multiplied with 
2ji/ encoder lines (1000). At low speeds, it was observed 
some oscillations in average speed in order to improve the 
overall accuracy 1 1 point averaging block is constructed as 
shown in Fig. 13. The speed of the dc motor is measured and 
displayed in the control desk shown in Fig. 14. The voltage 
vs. speed characteristic of DC motor for different voltages at 
no-load is measured and verified theoretically as shown in 
Fig. 15. 




Figure 13. Averaging model in Simulink 



300 



| 200 



mo u i;>j'.. 



OOIC 



OOli 



Q 930 



Figure 14. Speed of dc motor at V d = 40V displayed in the control 

desk 



32 



vc ACEEE 



ACEEE Int. J. on Control System and Instrumentation, Vol. 02, No. 03, October 201 1 

























3fXi 






















— HO 






















=. an 
<Si 150 






















tea 






















so 






















• 


E 


■a 


15 


3D 


2; 


3D 


38 


40 



V^mfilCw [V] 

Figure 15. Voltage vs. speed characteristics at no-load 

Conclusion 

In this paper, first, the single-pole and two-pole converter 
models are built and simulation results for the positive and 
negative values of slider gain are observed. Next, the 
comparator and the triangular waveform block of two-pole 



converter model is replaced with the DS1 104SL_DSP_PWM3 
block and the converter model is implemented in real-time. 
Finally, real-time model for speed control of DC motor is built 
and the voltage-speed characteristic of DC motor for different 
voltages at no-load is measured and verified theoretically. 

References 

[1] DSP Based Electric Drives Laboratory User Manual, Frequency 

Control of A C -Motor Drives, Department of Electrical and Computer 

Engineering University of Minnessota. 

[2] University of Minnesota, Introduction Getting Started with 

dSPACE, DSP Based Laboratory of Electric Drives 

[3] Mendrela "Dynamic Simulation of an Elevator driven by dc 

motor" Louisiana State University, Baton Rouge, LA. 

[4] Ned Mohan "first course in power electronics and drives " 

Third Edition, 2003. 

[5] Bimal K.Bose, Modern Power Electronics and AC Drives, © 

2002 Prentice Hall PTR. 

[6] "ELECTRIC DRIVES an integrative approach" by Ned Mohan, 

2000, MNPERE. 

[7] Control Desk Experiment Guide, dSPACE, May 2002. 



©2011 ACEEE 
DOI:01.LTCSI.02.03.197 



33 



vcACEEE